﻿#ifndef ANIMAL_H
#define ANIMAL_H

#include <QString>

class Animal
{
protected:
    QString m_name = "";
    int m_shoutNum = 3;

    virtual QString getShoutSound() = 0;  //声明为纯虚函数，Animal变为抽象类

public:
    Animal();
    Animal(QString name);
    int getShoutNum() const;
    void setShoutNum(int newShoutNum);
    virtual QString Shout();
    virtual ~Animal();
};

#endif // ANIMAL_H
